---
title: AgentQL Web Loader
description: Precise web data extraction for agents
icon: browser
---

AgentQL Web Loader is a tool that scrapes a URL with a given AgentQL query or a Natural Language description of the data you want to scrape.
Create your own AgentQL API key [here](https://dev.agentql.com).

## Description

[AgentQL](https://agentql.com) provides structured data extraction from any web page using an [AgentQL query](https://docs.agentql.com/concepts/query-language) or a Natural Language prompt. AgentQL can be used across multiple languages and web pages without breaking over time and change.

## Installation

```bash
agentstack tools add agentql
```

Set the environment variable in your project's `.env` file.

```env
AGENTQL_API_KEY=...
```

## Arguments

The following parameters can be used to customize the `AgentQL Web Loader`'s behavior:

| Argument                    | Type      | Description                                                                                                                                                                                                       |
| :-------------------------- | :-------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **url**                     | `string`  | The URL of the web page you want to query.                                                                                                                                                                        |
| **query**                   | `string`  | _Optional_. The AgentQL query to execute. Learn more about [how to write an AgentQL query in the docs](https://docs.agentql.com/agentql-query).                                                                   |
| **prompt**                  | `string`  | _Optional_. A Natural Language description of the data to query the page for. AgentQL will infer the data’s structure from your prompt. **Note: You must define either a `query` or a `prompt` to use AgentQL.**  |
| **is_stealth_mode_enabled** | `boolean` | Whether to enable experimental anti-bot evasion strategies. This feature may not work for all websites at all times. Data extraction may take longer to complete with this mode enabled. **Defaults to `False`.** |

## Examples

- [Research Assistant](https://github.com/AgentOps-AI/AgentStack/tree/main/examples/research_assistant)
- [Sentiment Analyzer](https://github.com/AgentOps-AI/AgentStack/tree/main/examples/sentiment_analyser)
- [Market Monitoring](https://github.com/AgentOps-AI/AgentStack/tree/main/examples/market_monitoring)
